package com.mpyy.handler.purchase;

import com.alibaba.fastjson.JSON;
import com.mpyy.pojo.DepotInfo;
import com.mpyy.service.purchase.SearchDepotInfoServiceInter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @version 1.0
 * @Descoription SearchDepotHandlerInfo
 * @Author CG
 * @date 2022-03-15
 */
@Controller
@RequestMapping(value = "/searchDepotHandlerInfo")
public class SearchDepotHandlerInfo {
    @Autowired
    @Qualifier(value = "searchDepotInfoServiceImpl")
    private SearchDepotInfoServiceInter depotInfoServiceInter;

    @RequestMapping(value ="/searchDepotInfo" )
    @ResponseBody
    public String searchDepotInfo(){
        List<DepotInfo> depotInfos = depotInfoServiceInter.searchDepotInfo();
/*        for (DepotInfo depotInfo : depotInfos) {
            System.out.println(depotInfo);
        }*/
        return JSON.toJSONString(depotInfos);
    }
}
